import axios from 'axios'
import qs from 'qs'
// 添加请求拦截器
axios.interceptors.request.use(function (config) {
    if (config.method != 'get') {
        config.data = qs.stringify(config.data);
    }
    // config.headers['Content-Type'] = 'application/x-www-form-urlencoded';
    return config;
}, function (error) {
    return Promise.reject(error)
})
axios.defaults.withCredentials=true
export default axios